package text;

public class Student {
    int age;
    String name;

    public Student(String name,int age){
        this.age = age;
        this.name = name;
    }

    public int getAge(){
        return age;
    }
    @Override
    public String toString() {
        return "这个人姓名叫"+name +",今年"+age+"岁";
    }

    @Override
    public boolean equals(Object obj) {
        Student student = (Student) obj;
        return this.name.equals(student.name);

    }


}
